
package chat;

import javax.swing.*;

public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        JFrame frame = new JFrame();

        Object[] options = {"Host Chatroom", "Join Chatroom"};
        int n = JOptionPane.showOptionDialog(frame,"What would you like to do?"
        , "MegaChat3000", JOptionPane.YES_NO_OPTION,
        JOptionPane.QUESTION_MESSAGE,
        null, options, options[0]);
        if (n==0) {
            new Server();
        }
        else if (n==1) {
            new Client();
        }
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);

    }
}
